org.eclipse.vtp.framework.engine
Class DescriptorUtils

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.DescriptorUtils

public final class DescriptorUtils
extends java.lang.Object

Utilities used by the various descriptors.

Author:
Lonnie Pryor

Constructor Summary
DescriptorUtils()
           
 
Method Summary
static boolean isValidImplementation(java.lang.Class type)
          Returns true if the specified type is a public, concrete class with at least one public constructor.
static boolean isValidImplementation(java.lang.Class type, java.lang.Class assignableToType)
          Returns true if the specified type is a public, concrete class with at least one public constructor and is assignable to the specified type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorUtils

public DescriptorUtils()
Method Detail

isValidImplementation

public static boolean isValidImplementation(java.lang.Class type)
                                     throws java.lang.NullPointerException
Returns true if the specified type is a public, concrete class with at least one public constructor.

Parameters:
type - The type to check.
Returns:
True if the specified type is a public, concrete class with at least one public constructor.
Throws:
java.lang.NullPointerException - If the supplied type is null.

isValidImplementation

public static boolean isValidImplementation(java.lang.Class type,
                                            java.lang.Class assignableToType)
                                     throws java.lang.NullPointerException
Returns true if the specified type is a public, concrete class with at least one public constructor and is assignable to the specified type.

Parameters:
type - The type to check.
assignableToType - The type the first type must be assignable to.
Returns:
True if the specified type is a public, concrete class with at least one public constructor and is assignable to the specified type.
Throws:
java.lang.NullPointerException - If the supplied type is null.
java.lang.NullPointerException - If the supplied assignable to type is null.